class Program
    {
        static void Main(string[] args)
        {
          // Do back up of ur registry before running it.
          //Registry path which has information of all the softwares installed on machine
            string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
            using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
            {
                foreach (string skName in rk.GetSubKeyNames())
                {
                    using (RegistryKey sk = rk.OpenSubKey(skName))
                    {
                        // we have many attributes other than these which are useful.
                        Console.WriteLine(sk.GetValue("DisplayName") + 
				"  " + sk.GetValue("DisplayVersion"));
                    }
                    
                }
            }
            Console.ReadLine(); // To make the o/p readable.
        }        
    }	